import 'package:taonile/generated/json/base/json_field.dart';
import 'package:taonile/generated/json/store_detail_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class StoreDetailEntity {
  late int code = 0;
  late String msg;
  late StoreDetailData data = StoreDetailData();

  StoreDetailEntity();

  factory StoreDetailEntity.fromJson(Map<String, dynamic> json) => $StoreDetailEntityFromJson(json);

  Map<String, dynamic> toJson() => $StoreDetailEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class StoreDetailData {
  late String id;
  late String name = '';
  late String logo = '';
  late String star;
  @JSONField(name: "save_num")
  late String saveNum;
  late List<String> banner = [];
  @JSONField(name: "is_save")
  late String isSave='0';

  StoreDetailData();

  factory StoreDetailData.fromJson(Map<String, dynamic> json) => $StoreDetailDataFromJson(json);

  Map<String, dynamic> toJson() => $StoreDetailDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
